home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / atari / birkhahn-metafont-packed-disks / mf27-2_2e-disk2.zoo / inputs / pandora.lzs / PANPUN.MF < prev    next >
Text File  |  1991-06-14  |  18KB  |  479 lines

  1. %*****************************************************************************
  2. %        Copyright (c) 1989 by N. N. Billawala
  3. %*****************************************************************************
  4.  
  5.  
  6. % punct.mf  punctuation: common in all character sets
  7.  
  8. % 21 characters
  9.  
  10.  
  11. iff OK "!":  "Exclamation point";
  12.   beginchar("!",I_w*width#+a_mono#,cap#,0);
  13.   min_limit(join_radius)(.5thin_stem.uc);
  14.   bot z1=(round(.5w),0);
  15.   z0=bot z1+(0,.5accent_dot_diameter);
  16.   top z3=(x1,h)//;  pos3(stem.uc,-oblique);
  17.   onaline(0,3)(2);  bot y2=max(bot y1+accent_dot_diameter+2,.3y3);
  18.   pos2(thin_stem.uc,-oblique);
  19.  
  20.   p1=dot.b(z1,accent_dot_diameter);
  21.   p2=(z3--z3l)softjoin(z3l--z2l)softjoin(z2l--z2r)softjoin(z2r--z3r)
  22.       softjoin(z3r--z3)--cycle;
  23.  
  24.   showpoints(0,1,2,3);
  25. adjust(v_a*fitbasis.uc#+m_a*a_mfit#,v_a*fitbasis.uc#+m_a*a_mfit#); 
  26. show_character; endchar;
  27.  
  28. % rotation of shape and slant of position with obliqueness
  29.  
  30.  
  31. iff OK "#":  "Sharp/number/hash/pound"; 
  32.   beginchar("#",.5width#+b_mono#,ascender#,descender#);
  33.   min_limit(join_radius)(.375stem.uc);
  34.  
  35.   multpos(1,2,3,4)(max(1,.75stem.uc),90);
  36.   bot lft z3l=(0,round(1.05math_axis-.2h-.5*max(1,.75stem.uc)))//;
  37.   z4l=(x3l+.9w,y3l);
  38.   bot rt z2l=(w,y3l+round .4h)//;  
  39.   z1l=(x2l-.9w,y2l);
  40.   onaline(1,2)(11); x11=round(.27[x1,x2]); 
  41.   onaline(3,4)(12); x12=round(.27[x3,x4]); 
  42.   onaline(11,12)(5,6); top y5=h-mathlines; bot y6=-d+mathlines;
  43.  
  44.   pickup mathpen rotated (angle(z5-z6)-90);
  45.   draw z5--z6; 
  46.   draw (z5--z6) shifted 
  47.        (max(round .5mathlines+2,round(abs(x2-x1))-2*round(.27(x2-x1))),0);
  48.   p1=(z1 soften(z1l,z2l,z2r,z1r) z1)--cycle;  
  49.   p2=(z3 soften(z3l,z4l,z4r,z3r) z3)--cycle;  
  50.  
  51.   showpoints(1,2,3,4,5,6,11,12);
  52. adjust(v_G*fitbasis.uc#+m_a*b_mfit#,v_G*fitbasis.uc#+m_a*b_mfit#); 
  53. show_character; endchar;
  54.  
  55.  
  56. iff OK "$":  "Dollar sign"; 
  57.   beginchar("$",num_width_b#+b_mono#,ascender#,0);
  58.  
  59.   top y2l=bot y2r+max(1,.75minor_curve.uc)=round(.9(h+d));
  60.   bot y6r=top y6l-max(1,.75minor_curve.uc)=round(.12(h+d));
  61.   rt z1=(.93w,y2r-.05(y2r-y6r))//;                 
  62.   lft z7=(0,y6r+.1(y2r-y6r))//;     
  63.   z4=(.5w,.52[y6r,y2l])//;
  64.   lft z3l=(if narrow_condition:0 else:round(.05w) fi,.5[y4,y2l])//; 
  65.   rt z5r=(w,.5[y6r,y4])//; 
  66.   good_x_for(2l)(z3l,z1,.5)a;  good_x_for(2r)(z3r,z1-(bulb_thickness,0),.4)b;
  67.   good_x_for(6r)(z7,z5r,.5)c;  good_x_for(6l)(z7+(bulb_thickness,0),z5l,.6)d;
  68.  
  69.   z3=z3l+(.5stem.uc,0); z5=z5r-(.5stem.uc,0);
  70.   ref1=z3..z4..z5;
  71.   pos4(stem.uc,(angle (postcontrol 1 of ref1-precontrol 1 of ref1))+90);
  72.   rt z3r=(lft x3l+max(1,.75stem.uc),(1-v_stress)[y4r,y2r]); 
  73.   lft z5l=(rt x5r-.75stem.uc,v_stress[y6l,y4l]);
  74.  
  75.   bot z10=(.5w,-ov_b.uc);  multpos(10,11)(max(1,.75thin_stem.uc),-oblique);
  76.   top z11=(.5w,h+ov_t.uc)//;
  77.  
  78.   p1=bulb.tr(z1,z2r,z2l,cs,bulb_thickness,90) 
  79.      o_t z3l{downward} o_t z4l i_t z5l i_t 
  80.      bulb.bl(z7,z6l,z6r,cs,bulb_thickness,90)
  81.      o_t z5r{upward} o_t z4r i_t z3r i_t cycle;
  82.   p2=(.5[z10l,z11l] soften(z11l,z11r,z10r,z10l) .5[z10l,z11l])--cycle;
  83.  
  84.   showpoints(1,2,3,4,5,6,7,8,10,11);
  85. adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#); 
  86. show_character; endchar;
  87.  
  88. % currently same width as the lining numbers
  89.  
  90.  
  91.  
  92. iff OK "%":  "Percent sign"; 
  93.   beginchar("%",.5width#+d_mono#,ascender#,0);
  94.  
  95.   top y1r=h;   bot y1l=top y1r-max(1,.5major_curve.lc);
  96.   bot y3r=.6h; top y3l=bot y3r+max(1,.5major_curve.lc);  
  97.   lft z2r=(0,(1-v_stress)[y3r,y1r])//;
  98.   rt z2l=(lft x2r+max(1,.5bowlstem.lc),(1-v_stress)[y3r,y1r]);  
  99.   rt z4r=(round(.5w),v_stress[y3r,y1r])//;
  100.   lft z4l=(rt x4r-max(1,.5bowlstem.lc),v_stress[y3r,y1r]);  
  101.   good_x_for(1r)(z2r,z4r,.52)a;  good_x_for(1l)(z2l,z4l,.48)b;  
  102.   good_x_for(3r)(z2r,z4r,.48)c;  good_x_for(3l)(z2l,z4l,.52)d;  
  103.  
  104.   pickup mathpen rotated angle((w,h)//-(0,0)//);
  105.   z10=(round(.5w),round(-.6h))//;
  106.   top rt z11=(w,h)//;          
  107.   bot lft z12=(0,0)//;
  108.   draw z11--z12;
  109.  
  110.   p1 =z1r{left} o_t z2r{downward} o_t z3r{right} o_t z4r{upward} o_t cycle;
  111.   p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle;
  112.   p2 =p1 shifted z10;
  113.   p2'=p1' shifted z10;
  114.  
  115.   z13r= point 3.5 of p1; pos13(max(1,.5major_curve.lc),90-oblique);
  116.   z14r= (.5[x13,x11],y13); pos14(max(1,.35bowlstem.lc),90-oblique);
  117.   z15=z11+(.5mathlines,0)rotated (angle((w,h)//-(0,-d)//)+90);
  118.   p3=z13l...z14l{right}...z15--z15...z14r{left}...z13r--cycle;
  119.  
  120.   showpoints(1,2,3,4,11,12,13,14,15);
  121. adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#); 
  122. show_character; endchar;
  123.  
  124.  
  125. iff OK "&":  "Ampersand"; 
  126.   beginchar("&",.65width#+d_mono#,cap#,0);
  127.  
  128.   bot y6r=top y6l-thin_stem.uc=-ov_b.uc;
  129.   top y2l=y2r+max(1,.9thin_stem.uc)=h+ov_t.uc;
  130.   z4=.65[z6r,z2l];  
  131.   rt z1l=(.75w if narrow_condition:+.05w fi,.5[y4,y2r])//;
  132.   pos1(max(1,.9thin_stem.uc),180); 
  133.   lft z3l=(round(.25w),.5[y4,y2r])//; 
  134.   pos3(max(1,.9stem.uc),0); 
  135.   z5=(if narrow_condition:.93w else:.9w fi,.8[y6r,y4])//; 
  136.   z11=(.95[x6l,x5],y5-terminal_thickness-.07h); 
  137.   multpos(5,11)(max(1,if narrow_condition:.8 else:.9 fi *thin_stem.uc),0);
  138.   lft z7r=(0,.45[y6r,y4])//;    rt z7l=z7r+(bowlstem.uc,0);      z7=.5[z7l,z7r];
  139.   z8=.5[z7r,z1l];
  140.   good_x_for(2r)(z3r,z1r,.5)a;  good_x_for(2l)(z3l,z1l,.5)b;
  141.   good_x_for(6l)(z7l,z11l,.4)c;  good_x_for(6r)(z7r,z11r,.4)d;
  142.   x6l:=min(x6l,x6r+thin_stem.uc);
  143.  
  144.   z9l=z8;
  145.   bot rt z10=(.9w,0); pos10(max(1,.57stem.uc),10);
  146.   ref0=z1{downward}..z8..z7{downward}; 
  147.   pos8(max(1,thin_stem.uc),angle(direction 1 of ref0)+90);
  148.   pos9(max(1,.9stem.uc),angle(direction 1 of ref0)+180);
  149.  
  150.   ref1=z2r{left} i_t z3r{downward}...
  151.        subpath(0,4)of reverse terminalserif.r(z10,z9,z9l,z9r,.5ts,0)soft;
  152.   ref2=subpath(4,20)of reverse terminalserif.r(z10,z9,z9l,z9r,.5ts,0)soft
  153.        ...z3l{upward} o_t z2l{right};
  154.   ref3=z6r{left} o_t z7r{upward} o_t z8l i_t z1r{upward} i_t z2r{left}; 
  155.   ref4=z6l{left} i_t z7l{upward} i_t z8r o_t z1l{upward} o_t z2l{left};
  156.   ref5=z5l..z11l i_t z6l{left};
  157.   ref6=reverse terminalserif(z5,z11,z11l,z11r,.75hs,0) o_t z6r{left}; 
  158.  
  159.   (t1,t2)=ref1 intersectiontimes ref3;  (t3,t4)=ref2 intersectiontimes ref3;
  160.   (t5,t6)=ref1 intersectiontimes ref4;  (t7,t8)=ref2 intersectiontimes ref4;
  161.   (t9,t10)=ref1 intersectiontimes ref5; (t11,t12)=ref2 intersectiontimes ref5;
  162.   (t13,t14)=ref1 intersectiontimes ref6;(t15,t16)=ref2 intersectiontimes ref6;
  163.  
  164.   p1 =reverse(subpath(0,t14)of ref6--subpath(t13,infinity)of ref1--
  165.       subpath(0,t15)of ref2--subpath(t16,infinity)of ref6--
  166.       subpath(0,t4)of ref3--subpath(t3,infinity)of ref2--
  167.       subpath(infinity,t6)of ref4--subpath(t5,t9)of ref1--
  168.       subpath(t10,1)of ref5)--cycle;
  169.   p1'=subpath(0,t1)of ref1--subpath(t2,infinity)of ref3--cycle;  
  170.   p2'=subpath(0,t8)of ref4--subpath(t7,t11)of ref2--
  171.       subpath(t12,infinity)of ref5--cycle;
  172.  
  173.   showpoints(1,2,3,4,5,6,7,8,9,10,11,41,42,43,44,45,46,47,48,100);
  174. adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_G*fitbasis.uc#+m_a*d_mfit#); 
  175. show_character; endchar;
  176.  
  177.  
  178. iff OK "'":  "Single right quote or apostrophe";
  179.   beginchar(oct"047",I_w*width#+a_mono#,cap#,0);
  180.   save_num(head)=accent_dot_diameter;
  181.   top z1=(.5w,.75[xheight,cap]-.5head)//;
  182.   ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0);
  183.   p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique);
  184.   showpoints(1);
  185. adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); 
  186. show_character; endchar;
  187.  
  188. % rotation and slant of position with obliqueness
  189.  
  190.  
  191. iff OK "(":  "Left parenthesis";             % need to add shift if w>.45h
  192.   beginchar("(",.25width#+b_mono#,maxheight#,maxdepth#); 
  193.   save_num(width_limit)=min(w,.4(h+d)); 
  194.   parenthesis_curl:=2; def p_c={curl parenthesis_curl} enddef;
  195.   min_limit(join_radius)(max(.5,.37thin_stem.uc));
  196.  
  197.   top z1l=(width_limit,h)//;
  198.   bot z3l=(width_limit,-d)//;
  199.   lft z2l=.5[z1l,z3l]+(width_limit,0)rotated(180-oblique);
  200.   pos2(max(1,.75stem.uc),-oblique);  
  201.   ref1=z1l...z2l{downward}...z3l; 
  202.   pos1(max(1,.75thin_stem.uc),angle(direction 0 of ref1)+90);
  203.   pos3(max(1,.75thin_stem.uc),angle(direction 2 of ref1)+90);
  204.   ref2=z1l p_c..z2l{downward}..p_c z3l; ref3=z3r p_c..z2r{upward}..p_c z1r;
  205.  
  206.   if softpath:p1=(z2l{downward}..p_c z3l)softjoin(z3l--z3r)softjoin
  207.          ref3 softjoin(z1r--z1l)softjoin(z1l p_c..z2l{downward})--cycle;
  208.     else:p1=ref2--ref3--cycle;  fi
  209.  
  210.   showpoints(1,2,3);
  211. adjust(v_C*fitbasis.uc#+m_c*b_mfit#,v_H*fitbasis.uc#+m_cc*b_mfit#); 
  212. show_character; endchar;
  213.  
  214.  
  215. iff OK ")":  "Right parenthesis";             % need to add shift if w>.45h
  216.   beginchar(")",.25width#+b_mono#,maxheight#,maxdepth#); 
  217.   save_num(width_limit)=min(w,.4(h+d)); 
  218.   parenthesis_curl:=2; def p_c={curl parenthesis_curl} enddef;
  219.   min_limit(join_radius)(max(.5,.37thin_stem.uc));
  220.  
  221.   top z1l=(0,h)//;
  222.   bot z3l=(0,-d)//;
  223.   lft z2l=.5[z1l,z3l]+(width_limit,0)rotated(-oblique);
  224.   pos2(max(1,.75stem.uc),180-oblique);  
  225.   ref1=z1l...z2l{downward}...z3l; 
  226.   pos1(max(1,.75thin_stem.uc),angle(direction 0 of ref1)-90);
  227.   pos3(max(1,.75thin_stem.uc),angle(direction 2 of ref1)-90);
  228.   ref2=z1l p_c..z2l{downward}..p_c z3l; ref3=z3r p_c..z2r{upward}..p_c z1r;
  229.  
  230.   if softpath:p1=(z2l{downward}..p_c z3l)softjoin(z3l--z3r)softjoin
  231.          ref3 softjoin(z1r--z1l)softjoin(z1l p_c..z2l{downward})--cycle;
  232.     else:p1=ref2--ref3--cycle; fi
  233.  
  234.   showpoints(1,2,3);
  235. adjust(v_H*fitbasis.uc#+m_cc*b_mfit#,v_C*fitbasis.uc#+m_c*b_mfit#); 
  236. show_character; endchar;
  237.  
  238.  
  239.  
  240. iff OK "*":  "Asterisk";
  241.   beginchar("*",.35width#+d_mono#,cap#,0);
  242.   save_num(w_h)=min(w,h); save_bool(softpath)=true; 
  243.   save_num(join_radius)=.3stem.uc;
  244.   z1=(.5w,if singlepitch:math_axis else:h-.5w_h fi)//;
  245.   top z3=z1+(0,.5w_h);
  246.   z2=whatever[z1,z3]; y2=.7[bot y1,top y3];  
  247.   multpos(2,3)(inlimit(.75stem.uc)(1,abs(z2-z1)-2),0);
  248.  
  249.   pickup pencircle scaled 1.5; draw z1;
  250.   ref1=(z1 soften(z2r,z3r,z3l,z2l) z1)--cycle;
  251.   for nn:=6: for n:=1 upto nn: 
  252.     p[n]=ref1 rotatedaround (z1,(1-n)*(360/nn)-oblique);  endfor endfor
  253.   
  254.   showpoints(1,2,3);
  255. adjust(v_d*fitbasis.uc#+m_a*d_mfit#,v_d*fitbasis.uc#+m_a*d_mfit#); 
  256. show_character; endchar;
  257.  
  258. % rotation of shape and slant of position with obliqueness
  259.  
  260.  
  261. iff OK "+":  "Plus sign"; 
  262.   beginchar("+",.5width#+b_mono#,cap#,0); 
  263.   save_num(w_h)=min(w,h);
  264.   pickup mathpen;
  265.   z0=(.5w,math_axis)//;
  266.   lft z1=round(z0-(.5w_h,0));
  267.   rt z2=lft z1+(w_h,0);
  268.   top z3=round(z0+(0,.5w_h));
  269.   bot z4=z3-(0,1.01w_h);
  270.   x2:=(x2 if(x3-x1)>(x2-x3):+1 elseif(x3-x1)<(x2-x3):-1 fi); 
  271.   draw z1--z2;
  272.   draw z3--z4;  
  273. adjust(v_a*fitbasis.uc#+m_a*b_mfit#,v_a*fitbasis.uc#+m_a*b_mfit#); 
  274. show_character; endchar;
  275.  
  276. % use different mathpen for softness
  277. % character position, but not shape slants with obliqueness
  278. % must make sure that the plus/minus have the same widths
  279.  
  280.  
  281. iff OK ",":  "Comma"; 
  282.   beginchar(",",1.15I_w*width#+a_mono#,xheight#,descender#);
  283.   save_num(head)=round_dot_diameter;
  284.   top z1=(round(.5w),.5round_dot_diameter)//;  
  285.   ref1=comma(z1,head,min(.8d,.6xheight),accent_thin_end,0);  
  286.   p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique);
  287.   showpoints(1);
  288. adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); 
  289. show_character; endchar;
  290.  
  291.  
  292. iff OK ".":  "Period"; 
  293.   beginchar(".",1.5I_w*width#+a_mono#,xheight#,0); 
  294.   bot z1=(.5w,0);
  295.   p1=dot.b(z1,round_dot_diameter);
  296.   showpoints(1);
  297. adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); 
  298. show_character; endchar;
  299.  
  300. % no slant of shape with obliqueness
  301.  
  302.  
  303.  
  304. iff OK "/":  "Right leaning slash";         % need to add shift if w>.45h
  305.   beginchar("/",.45width#+b_mono#,maxheight#,maxdepth#);  
  306.   pickup  mathpen rotated angle((min(w,.5(h+d)),h)//-(0,-d)//);
  307.   top rt z1=(min(w,.5(h+d)),h)//;          
  308.   bot lft z2=(0,-d)//;
  309.   draw z1--z2;
  310. adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); 
  311. show_character; endchar;
  312.  
  313. % use different mathpen for softness
  314.  
  315.  
  316.  
  317. iff OK ":":  "Colon"; 
  318.   beginchar(":",I_w*width#+a_mono#,xheight#,0); 
  319.   bot z1=(round(.5w),0); 
  320.   top z2=(x1,if singlepitch:h
  321.                else:max(.85xheight,top y1+round_dot_diameter+2) fi)//; 
  322.   p1=dot.b(z1,round_dot_diameter);
  323.   p2=dot.t(z2,round_dot_diameter);
  324.   showpoints(1,2);
  325. adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); 
  326. show_character; endchar;
  327.  
  328. % no slant of shape, but slant of position of top dot with obliqueness
  329.  
  330. iff OK ";":  "Semi-colon"; 
  331.   beginchar(";",I_w*width#+a_mono#,xheight#,descender#);
  332.   save_num(head)=round_dot_diameter;
  333.   top z1=(round(.5w),.5round_dot_diameter)//;  
  334.   top z2=(x1,if singlepitch:h
  335.                else:max(.85xheight,top y1+round_dot_diameter+2) fi)//; 
  336.   ref1=comma(z1,head,min(.8d,.6xheight),accent_thin_end,0);  
  337.   p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique);  
  338.   p2=dot.t(z2,round_dot_diameter);
  339.   showpoints(1,2);
  340. adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); 
  341. show_character; endchar;
  342.  
  343. % no slant of shape, but slant of position of top dot with obliqueness
  344.  
  345.  
  346. iff OK "=":  "Equals sign"; 
  347.   beginchar("=",.5width#+b_mono#,cap#,0); 
  348.   pickup mathpen;
  349.   bot lft z1=(0,math_axis+.15h)//;
  350.   rt z2=(lft x1+w,y1);  
  351.   top lft z3=(0,math_axis-.15h)//;
  352.   rt z4=(lft x3+w,y3);
  353.   draw z1--z2;
  354.   draw z3--z4;
  355. adjust(v_a*fitbasis.uc#+m_a*b_mfit#,v_a*fitbasis.uc#+m_a*b_mfit#); 
  356. show_character; endchar;
  357.  
  358. % use different mathpen for softness
  359. % character position, but not shape slants with obliqueness
  360.  
  361.  
  362. iff OK "?":  "Question mark"; 
  363.   beginchar("?",.35width#+b_mono#,cap#,0);   %.4width
  364.   min_limit(join_radius)(.5thin_stem.uc);
  365.   lft z1=(0,.9h)//;
  366.   rt z3r=(w,.75h)//; lft z3l=z3r-(stem.uc,0);
  367.   top y2r=bot y2l+max(1,major_curve.uc)=h+ov_t.uc; 
  368.   good_x_for(2r)(z1,z3r,.5)a; good_x_for(2l)(z1+(bulb_thickness,0),z3l,.5)b;
  369.   bot z7=(.35w,0);
  370.   z8=bot z7+(0,.5accent_dot_diameter);
  371.   bot z6=(bot z7+(0,max(bot y7+accent_dot_diameter+2,.3y2r)))//;
  372.   multpos(5,6)(thin_stem.uc,-oblique);  
  373.   onaline(6,8)(5); y5=max(y7+accent_dot_diameter+2,.35y2r);   
  374.   z4l=.4[z5l,z3l]; z4r=.4[z5r,z3r]; 
  375.  
  376.   p1=(bulb.tl(z1,z2l,z2r,cs,max(1,.75bulb_thickness),90)soft i_t z3l{downward} 
  377.       i_t z4l o_t z5l{downward}--z6l)softjoin(z6l--z6r)softjoin
  378.       (z6r--z5r{upward} i_t z4r o_t z3r{upward} o_t z2r{left})--cycle;
  379.   p2=dot.b(z7,accent_dot_diameter);
  380.  
  381.   showpoints(1,2,3,4,5,6,7,8);
  382. adjust(v_C*fitbasis.uc#+m_a*b_mfit#,v_C*fitbasis.uc#+m_a*b_mfit#); 
  383. show_character; endchar;
  384.  
  385.  
  386.  
  387. iff OK "@":  "Commercial at sign"; 
  388.   beginchar("@",.6width#+f_mono#,maxheight#,maxdepth#);
  389.   majorcurve:=max(1,.75major_curve.lc);
  390.   majorbowltip:=max(1,.75major_bowl_tip.lc);
  391.   minorcurve:=max(1,.75minor_curve.lc);
  392.   save major_curve,minor_curve,major_bowl_tip;
  393.   save_bool(ensure_min_archthickness):=false; 
  394.   save_num(thinline)=max(1,.4pt); 
  395.   major_curve.lc:=majorcurve; major_bowl_tip.lc:=majorbowltip;
  396.   minor_curve.lc:=minorcurve;
  397.  
  398.   top rt z11r=(if narrow_condition:w else:.75w fi,.75h)//; 
  399.   bot rt z13r=(if narrow_condition:w else:.75w fi,.27h)//;   
  400.    multpos(11,13)(max(1,.75stem.lc),0); 
  401.   onaline(11l,13l)(1l,5,6);    y1l=y1r=(y11r-minor_curve.lc)-minor_ductal.lc; 
  402.   onaline(11r,13r)(1r);        y5=ductal[.25h+major_curve.lc,y1l];
  403.                                y6=y5-major_curve.lc;
  404.   lft z3l=(if narrow_condition:.45w-.5*.75bowlstem.lc else:.25w fi,
  405.            (1-v_stress)[y13,y11r]-.15bowlstem.lc)//;
  406.   rt x3r=lft x3l+max(1,.75bowlstem.lc);
  407.   y3r=inlimit((1-v_stress)[y13r,y11r]+.15bowlstem.lc) 
  408.                (.25h+major_curve.lc,.75h-minor_curve.lc);
  409.  
  410.   ref1=bowl.l(z5,.25h,z1l,.75h,z3r,z3l); 
  411.   ref2=bowl.l(z5,.25h,z1r,.75h,z3r,z3l); 
  412.   ref3=outer_bowlpath(ref2);  
  413.   ref4=terminalserif.r(z13,z11,z5,z1r,0,0); 
  414.  
  415.  pickup pencircle scaled thinline;
  416.   rt z20 =(w,.5h)//;
  417.   rt z21 =z1r; 
  418.   top z22=(.5w,.95h)//;   
  419.   lft z23=(0,.5h)//;
  420.   bot z24=(.5w,.05h)//; 
  421.   z25=(.75[x24,x20],.3[y24,y13]);
  422.   draw (if narrow_condition:z20...z21{upward}else:z13{right}...z20{upward} fi
  423.        ...z22{left}...z23{downward}...z24{right}...z25) 
  424.        if singlepitch:shifted(0,-.5d) fi;
  425.   p1'=(bowl_counter(ref1)--cycle) if singlepitch:shifted(0,-.5d) fi;   % counter
  426.   p1 =(outer_juncture_path.br(ref3,ref4,5)--cycle)                     % bowl
  427.         if singlepitch:shifted(0,-.5d) fi;          
  428.  
  429.   showpoints(1,2,3,5,6,11,13,20,21,22,23,24,25);
  430. adjust(v_C*fitbasis.uc#+m_a*f_mfit#,v_C*fitbasis.uc#+m_a*f_mfit#); 
  431. show_character; endchar;
  432.  
  433. % this character is quite thin compared to the others and even has its own
  434. %  arch_thickness
  435.  
  436.  
  437.  
  438. iff OK "[":  "Left square bracket";          % need to add shift if w>.45h
  439.   beginchar("[",.3width#+b_mono#,maxheight#,maxdepth#);  
  440.   pickup mathpen;
  441.   top rt z1=(min(w,.3(h+d)),h)//;          
  442.   top lft z2=(0,h)//;
  443.   bot lft z3=(0,-d)//;
  444.   bot rt z4=(min(w,.3(h+d)),-d)//;          
  445.   draw z1--z2--z3--z4;
  446. adjust(v_A*fitbasis.uc#+m_e*b_mfit#,v_H*fitbasis.uc#+m_ee*b_mfit#); 
  447. show_character; endchar;
  448.  
  449. % use different mathpen for softness
  450.  
  451.  
  452. iff OK "]":  "Right square bracket";        % need to add shift if w>.45h
  453.   beginchar("]",.3width#+b_mono#,maxheight#,maxdepth#); 
  454.   pickup mathpen;
  455.   top lft z1=(0,h)//;
  456.   top rt z2=(min(w,.3(h+d)),h)//;          
  457.   bot rt z3=(min(w,.3(h+d)),-d)//;          
  458.   bot lft z4=(0,-d)//;
  459.   draw z1--z2--z3--z4;
  460. adjust(v_H*fitbasis.uc#+m_ee*b_mfit#,v_A*fitbasis.uc#+m_e*b_mfit#); 
  461. show_character; endchar;
  462.  
  463. % use different mathpen for softness
  464.  
  465.  
  466. iff OK "`":  "Single left quote";
  467.   beginchar(oct"140",I_w*width#+a_mono#,cap#,0);
  468.   save_num(head)=accent_dot_diameter;
  469.   z1=(.5w,.75[xheight,cap]-.5head-min(.6xheight,2pt))//;
  470.   ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0); 
  471.   p1=ref1 rotatedaround(z1,180 if prime:prime_angle fi -oblique);
  472.   showpoints(1);
  473. adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); 
  474. show_character; endchar;
  475.  
  476. % rotation and slant of position with obliqueness
  477.  
  478.  
  479.